﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DHQGHN.DAL.DataMapper
{
    class DataMapperFactory
    {
        //public static IDataMapper GetMapper(Type dtoType)
        //{
        //    try {                
        //        //return (IDataMapper)Activator.CreateInstance(dtoType);
        //        return new GenericMapper(dtoType);
        //    }
        //    catch (Exception ex)
        //    {
        //        throw ex;
        //    }
            
        //}
        public IDataMapper GetMapper(Type dtoType)
        {
            //switch (dtoType.Name)
            //{
            //    case "GplxDTO":
            //        return new Gplx.GplxMapper();
            //    case "SPinDTO":
            //        return new Gplx.SPinMapper();
            //    //DanhMucDTO
            //    case "DanhMucDTO":
            //        return new DanhMuc.DanhMucMapper();
            //    default:
                    return new GenericMapper(dtoType);
            //}
        }

    }
}
